public with sharing class PlatformController {
    public PlatformController() {

    }

    @AuraEnabled
    public static LightningCalloutResultBaseDTO sentPlatformEventService(String title,String content){
        News__e news = new News__e(title__c = title,Content__c = content);
        Database.SaveResult rs = Eventbus.publish(news);
        
        return new LightningCalloutResultBaseDTO(
            rs.isSuccess()?LightningCalloutResultBaseDTO.SUCCESS:LightningCalloutResultBaseDTO.FAILURE,
            rs.getErrors().size() !=0?rs.getErrors()[0].message:'',
            ''
        );
    }
}
